<?php
    $arrAnswer = $this->answer;
    $arrQuestion = $this->question;
?>
<table width="560" cellspacing="0" cellpadding="5" border="0" class="table_danhsach">
    <tbody><tr>
            <td colspan="4" class="td"><strong>Danh sách câu trả lời</strong></td>
        </tr>
        <tr style="font-weight: bold">
            <td align="center">Mã chứng khoán</td>
            <td align="center">Trả lời</td>
            <td align="center">Ngày</td>
            <td align="center">Chức năng</td>
        </tr>
        <?php
            if(!empty($arrAnswer)) :
                 foreach($arrAnswer as $value) :
        ?>
        <tr>
            <td align="center"><?=$arrQuestion[$value['mackid']]?></td>
            <td align="left"><?=$value['answer']?$value['answer']:''?></td>
            <td align="left"><?=date('d-m-Y', strtotime($value['createtime']))?></td>
            <td align="center">
            <?php
                if($value['refuse_flag'] == 1){
                    echo '<a href="/answer/refuse?id='.$value['id'].'">Nhận lại credit</a>';
                }
            ?>
            </td>
        </tr>
        <?php
                endforeach;
            endif;
        ?>
    </tbody>
</table>